package com.ruoyi.ring.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ruoyi.ring.config.ArrayToStringDeserializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 压力信息对象 az_ring_stress_change_info
 * 
 * @author liuwp
 * @date 2025-09-08
 */
@Data
public class RingStressChangeInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 设备sn */
    @Excel(name = "设备sn")
    private String deviceSn;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 计算日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计算日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date recordTime;

    /** 历史时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "历史时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date historyDay;

    /** 压力列表 */
    @Excel(name = "压力列表")
    @JsonProperty("list")
    @JsonDeserialize(using = ArrayToStringDeserializer.class)
    private String stressChangeList;

    /** 间隔时间 */
    @Excel(name = "间隔时间")
    private Integer timeInterval;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceSn", getDeviceSn())
            .append("userId", getUserId())
            .append("recordTime", getRecordTime())
            .append("historyDay", getHistoryDay())
            .append("stressChangeList", getStressChangeList())
            .append("timeInterval", getTimeInterval())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
